﻿

using Admin.NET.Core.Hub;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.NET.Core.Service.Hub;
/// <summary>
/// signalR消息服务
/// </summary>
public class MessageHubService: ISingleton
{

    public event EventHandler<RemoteLog> RemoteLogEvent;

    public event EventHandler<InformModel> MessageEvent;

    /// <summary>
    /// 添加日志
    /// </summary>
    /// <param name="log"></param>
    public void InvokeLog(RemoteLog log)
    {
        RemoteLogEvent?.Invoke(this, log);
    }
    /// <summary>
    /// 添加信息
    /// </summary>
    /// <param name="inform"></param>
    public void InvokeInform(InformModel inform)
    {
        MessageEvent?.Invoke(this, inform);
    }
}
